﻿using Handday.Erp.Transfer.Enum;
using Handday.Erp.Transfer.Models.Corp;
using Handday.Erp.Transfer.Repositories;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Handday.Erp.Transfer.Services.Imp
{
    /// <summary>
    ///企业服务
    /// </summary>
    public class CorpService : ICorpService
    {
        private readonly ICorpDapperRepository _corpDapperRepository;

        /// <summary>
        /// ctor
        /// </summary>
        public CorpService(
            ICorpDapperRepository corpDapperRepository)
        {
            _corpDapperRepository = corpDapperRepository;
        }

        /// <summary>
        /// erp转换企业列表
        /// </summary>
        /// <param name="featureType">功能类型：0：查询所有</param>
        public async Task<IEnumerable<CorpDto>> GetListAsync(ErpFeatureTypeEnum featureType)
        {
            var list = await _corpDapperRepository.GetListAsync(featureType);
            return list;
        }
    }
}